//------------------------------------------------------------------------------
// The contents of this file are subject to the nopCommerce Public License Version 1.0 ("License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at  http://www.nopCommerce.com/License.aspx. 
// 
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. 
// See the License for the specific language governing rights and limitations under the License.
// 
// The Original Code is nopCommerce.
// The Initial Developer of the Original Code is NopSolutions.
// All Rights Reserved.
// 
// Contributor(s): _______. 
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Text;
using Tathata.Common.Caching;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;
using System.Data;
using System.Globalization;
using Tathata.Common.DAL;
using Tathata.Common.BLL.Entities;
using Tathata.Common.BLL.EntityCollections;
using Tathata.Common.DAL.Managers;

namespace Tathata.Common.BLL.Managers
{
    /// <summary>
    /// Search log manager
    /// </summary>
    public class SearchLogManager
    {
        #region Methods

        /// <summary>
        /// Gets all search log items
        /// </summary>
        /// <returns>Search log collection</returns>
        public static SearchLogCollection GetAllSearchLogs()
        {
            return SearchLogDBManager.GetAllSearchLogs();
        }

        /// <summary>
        /// Gets a search log item
        /// </summary>
        /// <param name="SearchLogID">The search log item identifier</param>
        /// <returns>Search log item</returns>
        public static SearchLog GetBySearchLogID(int SearchLogID)
        {
            return SearchLogDBManager.GetBySearchLogID(SearchLogID);
        }

        /// <summary>
        /// Inserts a search log item
        /// </summary>
        /// <param name="SearchTerm">The search term</param>
        /// <param name="CustomerID">The customer identifier</param>
        /// <param name="CreatedOn">The date and time of instance creation</param>
        /// <returns>Search log item</returns>
        public static SearchLog InsertSearchLog(string SearchTerm, int CustomerID, DateTime CreatedOn)
        {
            return SearchLogDBManager.InsertSearchLog(SearchTerm, CustomerID, CreatedOn);
        }
        #endregion
    }
}
